<template> 
  <section class="component recording-record">
    <audio :src="url" controls autoplay ref="audio"></audio>
  </section>
</template>

<script lang="ts">
  import Vue from "vue";
  import Component from "vue-class-component";
  import { Watch, Prop, Emit } from "vue-property-decorator";

  @Component({
    components: {}
  })
  export default class RecordingRecord extends Vue {
    @Prop() public url: any;

    /**
     * 关闭窗口暂停录音
     */
    public paused(){
        console.log(this.url,'url')
      const pausedMusic = this.$refs['audio'] as any
      pausedMusic.currentTime = 0;
      pausedMusic.pause()
    }
    private mounted(){
        console.log(this.url,'append-to-body')
    }
  }
</script>

<style lang="less" scoped>
  .component.recording-record{
    text-align: center;
  }

</style>

